<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<!--    MD5-->
</head>
<body>
  <form action="#" method="post">
    <p>
<!--      requeird必填字段-->
      <span>用户名：</span><input type="text" id="username" required>
    </p>
    <p>
      <!--      requeird必填字段-->
      <span>密码：</span><input type="password" id="password" required>
    </p>
<!--    绑定事件   onclick-->
    <button type="button" onclick="check()">提交</button>

  </form>
  <script>
      function check(){
        var uname = document.getElementById('username');
        var pwd = document.getElementById('password');
        console.log(uname.value)
          //MD5 加密
        console.log(pwd.value)
          pwd.value='*****'

      }
  </script>
</body>
</html>